#$go2_exits = []
#StringProc.new("put('buy 1') if get_inv.find {|i| i['item'] == '(M) a whisper of Chaos'}.nil?")
#def go2_exit_room

$go2_exits = []
$go2_exits << 1767 # Deathtrap Dungeon - Buy a whisper of chaos if we don't have one already.
def go2_exit?(id); $go2_exits.include?(id) end
def go2_exits(id)
  echo id
  return unless $go2_exits.include?(1767)
  if id == 1767
    echo 'wat'
    put('buy 1') if get_inv.find {|i| i['item'] == '(M) a whisper of Chaos'}.nil?
  end
end

